package com.ruoyi.yun.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.yun.mapper.YunProfileFenceMapper;
import com.ruoyi.yun.domain.YunProfileFence;
import com.ruoyi.yun.service.IYunProfileFenceService;

/**
 * 围栏管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-10-24
 */
@Service
public class YunProfileFenceServiceImpl implements IYunProfileFenceService 
{
    @Autowired
    private YunProfileFenceMapper yunProfileFenceMapper;

    /**
     * 查询围栏管理
     * 
     * @param id 围栏管理主键
     * @return 围栏管理
     */
    @Override
    public YunProfileFence selectYunProfileFenceById(Long id)
    {
        return yunProfileFenceMapper.selectYunProfileFenceById(id);
    }

    /**
     * 查询围栏管理列表
     * 
     * @param yunProfileFence 围栏管理
     * @return 围栏管理
     */
    @Override
    public List<YunProfileFence> selectYunProfileFenceList(YunProfileFence yunProfileFence)
    {
        return yunProfileFenceMapper.selectYunProfileFenceList(yunProfileFence);
    }

    /**
     * 新增围栏管理
     * 
     * @param yunProfileFence 围栏管理
     * @return 结果
     */
    @Override
    public int insertYunProfileFence(YunProfileFence yunProfileFence)
    {
        return yunProfileFenceMapper.insertYunProfileFence(yunProfileFence);
    }

    /**
     * 修改围栏管理
     * 
     * @param yunProfileFence 围栏管理
     * @return 结果
     */
    @Override
    public int updateYunProfileFence(YunProfileFence yunProfileFence)
    {
        yunProfileFence.setUpdateTime(DateUtils.getNowDate());
        return yunProfileFenceMapper.updateYunProfileFence(yunProfileFence);
    }

    /**
     * 批量删除围栏管理
     * 
     * @param ids 需要删除的围栏管理主键
     * @return 结果
     */
    @Override
    public int deleteYunProfileFenceByIds(Long[] ids)
    {
        return yunProfileFenceMapper.deleteYunProfileFenceByIds(ids);
    }

    /**
     * 删除围栏管理信息
     * 
     * @param id 围栏管理主键
     * @return 结果
     */
    @Override
    public int deleteYunProfileFenceById(Long id)
    {
        return yunProfileFenceMapper.deleteYunProfileFenceById(id);
    }
}
